package com.lu.sys.mapper;

import com.lu.sys.controller.dto.UserPasswordDTO;
import com.lu.sys.entity.User;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Update;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author lulu
 * @since 2023-04-04
 */
public interface UserMapper extends BaseMapper<User> {

    @Update("update user set password = #{newPassword} where username = #{username} and password = #{password}")
    static int updatePassword(UserPasswordDTO userPasswordDTO) {
        return 0;
    }

    public List<String> getRoleNameByUserId(Integer userId);
}
